package com.springboot_nanhua4.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.springframework.data.relational.core.mapping.Table;
import org.springframework.web.multipart.MultipartFile;
// 补充Serializable导入
import java.io.Serializable;

@Data //生成get set
@TableName // 移除原value属性，匹配目标代码结构
// 实现Serializable接口
public class Student implements Serializable {
    @TableId(type = IdType.AUTO) // 表示id这个列是主键，且自增
    private Integer id;
    private String name;
    private Integer age;
    private String gender;

    private String photo;


    @TableField(exist = false)
    @JsonIgnore
    private MultipartFile photoFile;

    public MultipartFile getPhotoFile() {
        return photoFile;
    }

    public void setPhotofile(MultipartFile photoFile) {
        this.photoFile = photoFile;
    }
}